<?php defined('BASEPATH') OR die('No direct access allowed.');
/**
 * Description of "main-settings"
 *
 * Created on Jan 27, 2010
 * @author Ramon Gutierrez
 * @copyright Bitstop Network Services Inc.
 * @version 0.1
 */
?>

            <div id="body">
              <div class="sectionhead"><?php echo $this->lang->line('subtitle_edit_settings'); ?></div>
              <div id="response"></div>
              <form id="theform" method="post" action="<?php echo site_url('main/settings_ajax'); ?>">
              <div class="row">
                <?php if($this->session->userdata('account_type') == 'company'): ?>
                <div>
                  <span class="label"><?php echo $this->lang->line('signup_company_name'); ?></span>
                  <input class="standard" style="font-weight: bold;" type="text" size="50" id="company_name" value="<?php echo $info['name']; ?>" name="company_name" maxlength="128" />
                </div>
                <div>
                  <span class="label"><?php echo $this->lang->line('signup_industry_type'); ?></span>
                  <select class="standard" name="industry_type" id="industry_type">
                  <option value="">Select an industry type</option>
                  <?php foreach($industry_types->result_array() as $row): ?>
                  <?php $selected = ($row['id'] == $info['industry_type'] ? ' selected="selected"' : ''); ?>
                  <?php echo '<option value="' . $row['id'] . '"' . $selected . '>' . $row['title'] . '</option>'; ?>
                  <?php endforeach; ?>
                  </select>
                </div>
                <div>
                  <span class="label"><?php echo $this->lang->line('street_address'); ?></span>
                  <input class="standard" type="text" size="50" id="street_address" name="street_address" value="<?php echo $info['street_address']; ?>" maxlength="128" />
                </div>
                <div>
                  <span class="label"><?php echo $this->lang->line('city'); ?></span>
                  <input class="standard" type="text" size="50" name="city" id="city" value="<?php echo $info['city']; ?>" maxlength="128" />
                </div>
                <div>
                  <span class="label"><?php echo $this->lang->line('state'); ?></span>
                  <input class="standard" type="text" size="50" name="state" id="state" value="<?php echo $info['state']; ?>" maxlength="128" />
                </div>
                <div>
                  <span class="label"><?php echo $this->lang->line('country'); ?></span>
                  <select class="standard" name="country_id" id="country_id">
                  <option value="">Select a country</option>
                  <?php foreach($countries->result_array() as $row): ?>
                  <?php $selected = ($row['id'] == $info['country_id'] ? ' selected="selected"' : ''); ?>
                  <?php echo '<option value="' . $row['id'] . '"' . $selected . '>' . $row['name'] . " ($row[abbreviation])" . '</option>'; ?>
                  <?php endforeach; ?>
                  </select>
                </div>
                <div>
                  <span class="label"><?php echo $this->lang->line('zipcode'); ?></span>
                  <input class="standard" type="text" size="15" id="zip" name="zip" value="<?php echo $info['zip']; ?>" maxlength="10" />
                </div>
                <div>
                  <span class="label"><?php echo $this->lang->line('email'); ?></span>
                  <input class="standard" type="text" size="25" id="email" name="email" value="<?php echo $info['email']; ?>" maxlength="64" />
                </div>
                <div>
                  <span class="label"><?php echo $this->lang->line('contact_number'); ?></span>
                  <input class="standard" type="text" size="25" id="contact_number" name="contact_number" value="<?php echo $info['contact_number']; ?>" maxlength="32" />
                </div>
                <div>
                  <span class="label"><?php echo $this->lang->line('signup_account_details'); ?></span>
                  <div style="padding: 5px 10px; border: 1px solid #333333; display: inline-block;">
                    <div>
                      <span class="label"><?php echo $this->lang->line('username'); ?></span>
                      <input class="standard" type="text" size="25" id="acct_username" name="acct_username" value="<?php echo $info['username']; ?>" maxlength="32" />
                    </div>
                    <div>
                      <span class="label"><?php echo $this->lang->line('change_password'); ?></span>
                      <input class="standard" type="password" size="25" id="acct_password" name="acct_password" maxlength="32" />
                    </div>
                    <div>
                      <span class="label"><?php echo $this->lang->line('change_confirm'); ?></span>
                      <input class="standard" type="password" size="25" id="acct_confirm" name="acct_confirm" maxlength="32" />
                    </div>
                  </div>
                </div>
                <div style="margin-top: 10px;">
                  <span class="label"><?php echo $this->lang->line('signup_contact_person'); ?></span>
                  <div style="padding: 5px 10px; border: 1px solid #333333; display: inline-block;">
                    <div class="firstcol">
                      <span class="label"><?php echo $this->lang->line('first_name'); ?></span>
                      <input class="standard" type="text" size="25" id="first_name" name="first_name" value="<?php echo $info['first_name']; ?>" maxlength="32" />
                    </div>
                    <div class="nextcol">
                      <span class="label"><?php echo $this->lang->line('last_name'); ?></span>
                      <input class="standard" type="text" size="25" id="last_name" name="last_name" value="<?php echo $info['last_name']; ?>" maxlength="32" />
                    </div>
                    <div class="clear"></div>
                  </div>
                </div>
                <?php else: ?>
                <?php endif; ?>
              </div>
              <div style="margin-top: 8px; font-size: 0.9em;">
                <div class="firstcol">
                  <a class="button-form submit" href="javascript:void(null);" id="btn-submit" style="margin-right: 8px;"><img src="<?php echo site_url('images/btn-submit.png'); ?>" alt="" /><?php echo $this->lang->line('save_changes'); ?></a>
                  <noscript><div><input type="submit" value="<?php echo $this->lang->line('save_changes'); ?>" /></div></noscript>
                </div>
                <div class="nextcol" style="margin: 0;">
                  <a class="button-form" id="btn-back" style="margin-right: 8px;" href="<?php echo site_url($module); ?>"><img src="<?php echo site_url('images/btn-back.png'); ?>" alt="" /><?php echo $this->lang->line('nav_cancel'); ?></a>
                </div>
                <div class="clear"></div>
              </div>
              </form>
            </div>
            